State used to send and receive data from demo GUI.
More...
Go to the source code of this file.
Data Structures |
| union | GUICmd_t |
| union | GUICmdString_t |
Defines |
|
#define | TRUE (1u) |
|
#define | CLEAR (0u) |
|
#define | BITS_IN_NIBBLE (4u) |
|
#define | BITS_IN_BYTE (8u) |
|
#define | BYTES_IN_16 (2u) |
|
#define | BYTES_IN_32 (4u) |
|
#define | BIT_DEFINITION |
|
#define | BIT0 (1u << 0u) |
|
#define | BIT1 (1u << 1u) |
|
#define | BIT2 (1u << 2u) |
|
#define | BIT3 (1u << 3u) |
|
#define | BIT4 (1u << 4u) |
|
#define | BIT5 (1u << 5u) |
|
#define | BIT6 (1u << 6u) |
|
#define | BIT7 (1u << 7u) |
|
#define | BIT8 (1u << 8u) |
|
#define | BIT9 (1u << 9u) |
|
#define | BIT10 (1u << 10) |
|
#define | BIT11 (1u << 11) |
|
#define | BIT12 (1u << 12) |
|
#define | BIT13 (1u << 13) |
|
#define | BIT14 (1u << 14) |
|
#define | BIT15 (1u << 15) |
|
#define | BIT16 (1u << 16) |
|
#define | BIT17 (1u << 17) |
|
#define | BIT18 (1u << 18) |
|
#define | BIT19 (1u << 19) |
|
#define | BIT20 (1u << 20) |
|
#define | BIT21 (1u << 21) |
|
#define | BIT22 (1u << 22) |
|
#define | BIT23 (1u << 23) |
|
#define | BIT24 (1u << 24) |
|
#define | BIT25 (1u << 25) |
|
#define | BIT26 (1u << 26) |
|
#define | BIT27 (1u << 27) |
|
#define | BIT28 (1u << 28) |
|
#define | BIT29 (1u << 29) |
|
#define | BIT30 (1u << 30) |
|
#define | BIT31 (1u << 31) |
|
#define | GUI_STATE_RUN_HAS_BEEN_EXECUTED ((uint8_t)0xA5u) |
|
#define | N_GUI_ARGS ((uint8_t)3u) |
|
#define | N_ELEMENTS(X) (sizeof(X)/sizeof(*(X))) |
Functions |
| uint32_t | u32fnGUISwitchCase (const uint8_t *pu8Cmd, uint8_t *pu8RawResponse, uint8_t *pu8Size, uint8_t *pu8TextResponse, uint8_t *pu8TextSize) |
| | Used to select which command will be executed, based on the incoming message.
|
| void | vfnGUIStateFormatCurveData (uint16_t *au16LabviewData) |
| | This function takes data from gau16RawAccels and formats it into a Labview-friendly format.
|
| uint32_t | u32fnGUISendResponseFrame (const uint8_t *pu8Cmd, const uint8_t *pu8RawResponse, const uint8_t *pu8Size, const uint8_t *pu8TextResponse, const uint8_t u8TextSize) |
| | After the raw response is ready, this function formats it into the correct format and sends it over to the GUI.
|
| void | vfnGUISBCCapTests (uint8_t *pu8Size, uint8_t *pu8RawResponse, uint8_t u8ERx, uint8_t u8Test) |
| | Performs Cap tests as requested by the GUI.
|
| void | vfnGUISBCLeakageTests (const uint8_t cu8Side, const uint8_t cu8Squib, const uint8_t cu8LeakageType, uint8_t *pu8Result) |
| | Performs a specific leakage or resistance tests (squibs).
|
| void | vfnGUICheckSatellites (const uint16_t *pu16Mask, uint8_t *pu8Result) |
| | Verifies that satellites have started up correctly by restarting them.
|
| void | vfnVerifyValidityOfCmd (const uint8_t *pu8Cmd, const GUICmdString_t *ptValidCmd, const uint16_t u16TableSize, uint8_t *pu8Result) |
| | Verifies that a given command is in the list of approved commands (catGUIValidCommands). This function is directly linked to command '1'.
|
| void | vfnGUISatAndSquibState (const uint8_t u8Mode, const uint16_t cu16Step) |
| | Used to send to GUI a verbose list of active satellites and squibs Due to time constrains, this function is broken into n subsections or threads.
|
Detailed Description
State used to send and receive data from demo GUI.
Copyright (C) 2011 Freescale Semiconductor Freescale Confidential Proprietary
- Author:
- Freescale Semiconductor
-
SASD Automotive
-
r11515
- Version:
- Date:
- Warning:
- (If needed)
History:
Function Documentation
| uint32_t u32fnGUISendResponseFrame |
( |
const uint8_t * |
pu8Cmd, |
|
|
const uint8_t * |
pu8RawResponse, |
|
|
const uint8_t * |
pu8Size, |
|
|
const uint8_t * |
pu8TextResponse, |
|
|
const uint8_t |
u8TextSize |
|
) |
| |
After the raw response is ready, this function formats it into the correct format and sends it over to the GUI.
- Parameters:
-
| pu8Cmd,: | pointer to the command and arguments used for the previous response. |
| pu8RawResponse,: | Pointer to memory location where the response is to be stored. First element must be either '00' or '01' for passed or failed, and the next locations should contain data. |
| pu8Size,: | Pointer to location where the size of the raw response is stored. |
| pu8TextResponse,: | Pointer to memory location where a text message is stored. It will be sent as status. |
| u8TextSize,: | Size for TextResponse. |
- Returns:
- u32Status.
| uint32_t u32fnGUISwitchCase |
( |
const uint8_t * |
pu8Cmd, |
|
|
uint8_t * |
pu8RawResponse, |
|
|
uint8_t * |
pu8Size, |
|
|
uint8_t * |
pu8TextResponse, |
|
|
uint8_t * |
pu8TextSize |
|
) |
| |
Used to select which command will be executed, based on the incoming message.
- Parameters:
-
| pu8Cmd,: | Pointer to command and arguments structure. |
| pu8RawResponse,: | Pointer to memory location where the response is to be stored. First element must be either '01' or '00' for passed or failed, and the next locations should contain data. |
| pu8Size,: | Pointer to location where the size of the raw response will be stored. |
| pu8TextResponse,: | Pointer to memory location where a text message will be stored to be sent to GUI as status. |
| pu8TextSize,: | Pointer to location where the size for the status message size will be stored. |
- Returns:
- u32Status from whatever function was called, if any.
| void vfnGUICheckSatellites |
( |
const uint16_t * |
pu16Mask, |
|
|
uint8_t * |
pu8Result |
|
) |
| |
Verifies that satellites have started up correctly by restarting them.
- Parameters:
-
| pu16Mask,: | Pointer to mask list with all satellites to be tested. |
| pu8Result,: | Pointer to memory location where the response is to be stored. First element must be either TRUE or CLEAR for passed or failed, and the next locations should contain data. |
- Returns:
- Void.
- Warning:
- This routine must reset the SBC. This operation is limited to three times after a POR by the SBC itself.
| void vfnGUISatAndSquibState |
( |
const uint8_t |
u8Mode, |
|
|
const uint16_t |
cu16Step |
|
) |
| |
Used to send to GUI a verbose list of active satellites and squibs Due to time constrains, this function is broken into n subsections or threads.
- Parameters:
-
| u8Mode,: | Selects between parallel or serial transfer of info. |
| cu16Step,: | Execution step. |
- Returns:
- Void.
| void vfnGUISBCCapTests |
( |
uint8_t * |
pu8Size, |
|
|
uint8_t * |
pu8RawResponse, |
|
|
uint8_t |
u8ERx, |
|
|
uint8_t |
u8Test |
|
) |
| |
Performs Cap tests as requested by the GUI.
- Parameters:
-
| pu8Size,: | Pointer to location where the size of the raw response is stored. |
| pu8RawResponse,: | Pointer to memory location where the response is to be stored. First element must be either '00' or '01' for passed or failed, and the next locations should contain data. |
| u8ERx,: | Defines which ERx to perform the test on. |
| u8Test,: | Test index according to cau8SBCTests. |
- Returns:
- Void.
| void vfnGUISBCLeakageTests |
( |
const uint8_t |
cu8Side, |
|
|
const uint8_t |
cu8Squib, |
|
|
const uint8_t |
cu8LeakageType, |
|
|
uint8_t * |
pu8Result |
|
) |
| |
Performs a specific leakage or resistance tests (squibs).
- Parameters:
-
| cu8Side,: | low (TRUE) or high (CLEAR) side |
| cu8Squib,: | Any valid squib index, from 0 - 11. |
| cu8LeakageType,: | Low leakage (TRUE) or high leakage (CLEAR). |
| pu8Result,: | Pointer to memory location where the response is to be stored. First element must be either TRUE or CLEAR for passed or failed, and the next locations should contain data. |
- Returns:
- Void.
| void vfnGUIStateFormatCurveData |
( |
uint16_t * |
au16LabviewData | ) |
|
This function takes data from gau16RawAccels and formats it into a Labview-friendly format.
- Parameters:
-
| au16LabviewData,: | Pointer to the location where the Labview array should be placed. |
- Returns:
- Void.
| void vfnVerifyValidityOfCmd |
( |
const uint8_t * |
pu8Cmd, |
|
|
const GUICmdString_t * |
ptValidCmd, |
|
|
const uint16_t |
u16TableSize, |
|
|
uint8_t * |
pu8Result |
|
) |
| |
Verifies that a given command is in the list of approved commands (catGUIValidCommands). This function is directly linked to command '1'.
- Parameters:
-
| pu8Cmd,: | Pointer to commands and arguments. |
| ptValidCmd,: | Pointer to the list of valid commands and arguments. |
| u16TableSize,: | Number of elements in ptValidCmd |
| pu8Result,: | Pointer to memory location where the response is to be stored. First element must be either TRUE or CLEAR for passed or failed. |
- Returns:
- Void.